package com.lorenzogao.lib_view

import android.content.Context
import android.util.AttributeSet
import android.widget.ListView

/**
 *  create by LorenzoGao
 *  email: 2508719070@qq.com
 *  TIME: 2019-11-08 11:27
 *  description:
 */
 

class MyListView :ListView{
    constructor(context: Context?) : super(context)
    constructor(context: Context?, attrs: AttributeSet?) : super(context, attrs)
    constructor(context: Context?, attrs: AttributeSet?, defStyleAttr: Int) : super(context, attrs, defStyleAttr)


    override fun onMeasure(widthMeasureSpec: Int, heightMeasureSpec: Int) {


        val heightMeasureSpec=MeasureSpec.makeMeasureSpec(Int.MAX_VALUE shr 2,MeasureSpec.AT_MOST)

        super.onMeasure(widthMeasureSpec, heightMeasureSpec )
    }

}